Compute spatial average of plants variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=short), | intent(in) | :: | dt |
time step (s) |
||
type(grid_real), | intent(in) | :: | lai |
leaf area index (m2/m2) |
||
type(grid_real), | intent(in) | :: | gpp |
gross primary production (t) |
||
type(grid_real), | intent(in) | :: | npp |
net primary production (t) |
||
type(grid_real), | intent(in) | :: | stem |
stem biomass (t) |
||
type(grid_real), | intent(in) | :: | root |
root biomass (t) |
||
type(grid_real), | intent(in) | :: | leaf |
foliage biomass (t) |
||
type(grid_real), | intent(in) | :: | cover |
canopy cover (0-1) |
||
type(grid_real), | intent(in) | :: | dbh |
diameter at brest heigth (cm) |
||
type(grid_real), | intent(in) | :: | height |
tree height (m) |
||
type(grid_real), | intent(in) | :: | density |
tree density (tree/hectare) |
||
type(grid_real), | intent(in) | :: | stemyield |
stem yield (t) |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=short), | public | :: | count | ||||
integer(kind=short), | public | :: | i |
SUBROUTINE ComputeSpatialAveragePlants & ! (dt, lai, gpp, npp, stem, root, leaf, cover, dbh, height, density, stemyield) IMPLICIT NONE !arguments with intent in: INTEGER (KIND = short), INTENT(IN) :: dt !!time step (s) TYPE (grid_real), INTENT(IN) :: lai !!leaf area index (m2/m2) TYPE (grid_real), INTENT(IN) :: gpp !!gross primary production (t) TYPE (grid_real), INTENT(IN) :: npp !!net primary production (t) TYPE (grid_real), INTENT(IN) :: stem !!stem biomass (t) TYPE (grid_real), INTENT(IN) :: root !!root biomass (t) TYPE (grid_real), INTENT(IN) :: leaf !!foliage biomass (t) TYPE (grid_real), INTENT(IN) :: cover !!canopy cover (0-1) TYPE (grid_real), INTENT(IN) :: dbh !!diameter at brest heigth (cm) TYPE (grid_real), INTENT(IN) :: height !!tree height (m) TYPE (grid_real), INTENT(IN) :: density !!tree density (tree/hectare) TYPE (grid_real), INTENT(IN) :: stemyield !!stem yield (t) !local declarations INTEGER (KIND = short) :: i INTEGER (KIND = short) :: count !-------------------------------end of declaration----------------------------- DO i = 1, nextents count = 0 !leaf area index IF ( plantsout (1) ) THEN count = count + 1 extents (i) % plants (count) = & GetMean (lai, maskInteger = extents (i) % mask ) END IF !gross primary production IF ( plantsout (2) ) THEN count = count + 1 extents (i) % plants (count) = & GetSum (gpp, maskInteger = extents (i) % mask ) END IF !net primary production IF ( plantsout (3) ) THEN count = count + 1 extents (i) % plants (count) = & GetSum (npp, maskInteger = extents (i) % mask ) END IF !stem biomass IF ( plantsout (4) ) THEN count = count + 1 extents (i) % plants (count) = & GetSum (stem, maskInteger = extents (i) % mask ) END IF !root biomass IF ( plantsout (5) ) THEN count = count + 1 extents (i) % plants (count) = & GetSum (root, maskInteger = extents (i) % mask ) END IF !leaf biomass IF ( plantsout (6) ) THEN count = count + 1 extents (i) % plants (count) = & GetSum (leaf, maskInteger = extents (i) % mask ) END IF !canopy cover IF ( plantsout (7) ) THEN count = count + 1 extents (i) % plants (count) = & GetMean (cover, maskInteger = extents (i) % mask ) END IF !diameter at brest height IF ( plantsout (8) ) THEN count = count + 1 extents (i) % plants (count) = & GetMean (dbh, maskInteger = extents (i) % mask ) END IF !tree height (m) IF ( plantsout (9) ) THEN count = count + 1 extents (i) % plants (count) = & GetMean (height, maskInteger = extents (i) % mask ) END IF !tree density (tree/hectare) IF ( plantsout (10) ) THEN count = count + 1 extents (i) % plants (count) = & GetMean (density, maskInteger = extents (i) % mask ) END IF !stem yield IF ( plantsout (11) ) THEN count = count + 1 extents (i) % plants (count) = & GetSum (stemyield, maskInteger = extents (i) % mask ) END IF END DO RETURN END SUBROUTINE ComputeSpatialAveragePlants